<?php
class FullfillAction extends Action{
	var $uid;
	private $school;
	private $name;
	private $address;
	private $mophone;
	private $qq;
	private $city;
	private $permission;
	function checkInfo(){
		$user = D('UserProfile', 'home');
		$user->uid = $this->uid;
		$user_info = $user->getUserInfo();
		foreach ($user_info['profile']['list'] as $key => $value){
			if(array_key_exists('school', $value)){
				$school .= $value['school'];
			}elseif(array_key_exists('company', $value)){
				$school .= $value['company'];
			}
		}
		$name		 		 = $user_info['intro']['list'][0]['value'];//名字
		$address			 = $user_info['contact']['list'][0]['value'];//地址
		$mophone			 = $user_info['contact']['list'][3]['value'];//手机
		$qq					 = $user_info['contact']['list'][4]['value'];//qq
		$city				 = $user_info['detail']['city'];//城市
		if ($school && $name && $address && $mophone && $qq && $city) {
			$permission = true;
		}else{
			$permission=  false;
		}
		if(!$permission){
    		$this->assign('jumpUrl',U('home/Account/index#base'));
    		$this->error("请完善个人资料！必填真实姓名，学校，专业，年级，电话，QQ，邮箱，地址！");
    	}//如果没有填写这些项目，必须完善！
	}
}
?>